<div class="form-horizontal row searchLineWrap ">
	<form id="reviewUser" name="reviewUser" action="${cxt!}/reviewUser/userApplicantList" method="post">
		<div class="col-md-12">
			<div class="row"> 
				<div class="col-md-5">
					<div class="form-group">
				 		<label  class="col-md-3 control-label">${_res["user.review.applicationname"]}:</label>
				        <div class="col-md-6">
			            	<input type="text" class="form-control" name="customer.l_username" placeholder="${_res['user.review.applicationname']}" value="${paramMap['customer.l_username']}"/>
				        </div>
				    </div>
				</div>
				
				<div class="col-md-5">
					<div class="form-group">
				 		<label  class="col-md-3 control-label">${_res["customer.authenticationstatus"]}:</label>
				        <div class="col-md-6">
			            	<#dict type="select" name="applicantForm.f_status"  dictCode="REVIEW_STATUS" defaultValue="${paramMap['applicantForm.f_status']}"/>
				        </div>
				   </div>
				</div>
			</div>
			
			<div class="row">
				<div class="col-md-5">
					<div class="form-group">
				 		<label  class="col-md-3 control-label">${_res["customer.targetUser"]}:</label>
				        <div class="col-md-6">
			            	<#dict type="select" name="applicantForm.f_targetRoleId"  table="customer_role_rank" filedName="name" filedValue="id"   defaultValue="${paramMap['applicantForm.f_targetRoleId']}"/>  
				        </div>
				   </div>
				</div>
				
				<div class="col-md-5">
					<div class="form-group">
				 		<label  class="col-md-3 control-label">${_res["customer.currentUser"]}:</label>  
				        <div class="col-md-6">
			            	<#dict type="select" name="customer.f_rolerankid"  table="customer_role_rank" filedName="name" filedValue="id"   defaultValue="${paramMap['customer.f_rolerankid']}"/>  
				        </div>
				   </div>
				</div>
			</div>
				
			<div class="row">
				<div class="col-md-5">
					<div class="form-group">
				 		<label  class="col-md-3 control-label">${_res["system.startdate"]}:</label>
				         <div class="col-md-6">
			            	<input type="text" class="form-control layer-date laydate-icon" onclick="laydate()" name="applicantForm.gt_applicateDate"  placeholder="${_res['system.startdate']}" value="${paramMap['applicantForm.gt_applicateDate']}"/>
				         </div>
				    </div>
				</div>
				
				<div class="col-md-5">
					<div class="form-group">
				 		<label  class="col-md-3 control-label">${_res["user.review.applicationType"]}:</label>  
				        <div class="col-md-6">
			            	<#dict type="select" name="applicantForm.f_applicationType"  dictCode="APPLICATION_TYPE" defaultValue="${paramMap['applicantForm.f_applicationType']}"/>  
				        </div>
				   </div>
				</div>
			</div>	
			<div class="row">
				<div class="col-md-5">
					<div class="form-group">
				 		<label  class="col-md-3 control-label">${_res["system.enddate"]}:</label>
				    	<div class="col-md-6" >
			        		<input type="text" class="form-control layer-date laydate-icon" onclick="laydate()" name="applicantForm.le_applicateDate"  placeholder="${_res['system.enddate']}" value="${paramMap['applicantForm.le_applicateDate']}"/>
				    	</div>
					</div>
				</div>
				
				<div class="col-md-5">
					<div class="form-group">
				 		<div  class="col-md-9 control-label">
				 			<button type="button" class="btn btn-primary pull-lift" onclick="ajaxForm('content','reviewUser')">
				          		<i class="fa fa-search m-l-sm m-r-xs"></i>${_res["system.search"]}
				         	</button>
				        </div>
				   </div>
				</div>
			</div>
		</div>
	</form>
</div>

<div class="row searchLineWrap" id="dataTable">
	
	<% #ajax userTable: { %>
	<table class="table table-bordered table-hover dataTables-example" >
		<thead>
			<tr>
				<th>${_res["user.review.username"]}</th>
				<th>${_res["customer.fullname"]}</th>
				<th>${_res["user.review.applicationType"]}</th>
				<th>${_res["user.review.countryandcity"]}</th>
				<th>${_res["user.review.applicantdate"]}</th>
				<th>${_res["user.review.applyforrole"]}</th>
				<th>${_res["user.review.currentuserrole"]}</th>
				<th>${_res["user.review.status"]}</th>
				<th>${_res["user.review.processor"]}</th>
			</tr>
		</thead>
		<tbody>
			<% for(record in splitPage.list){ %>
			<tr class="gradeC">
				<td style="background-color: rgb(255, 255, 255);">${record.username!}</td>
				<td style="background-color: rgb(255, 255, 255);">${record.showname!}</td>
				<td style="background-color: rgb(255, 255, 255);"><#dict type="lable" dictCode="APPLICATION_TYPE" value="${record.applicationType!}"/></td>
				<td style="background-color: rgb(255, 255, 255);"><#dict type="lable" table="country_region" filedName="name" filedValue="id" value="${record.customerAddress_country!}"/> / ${record.state!}</td>
				<td style="background-color: rgb(255, 255, 255);">${record.applicateDate!,dateFormat="yyyy-MM-dd HH:mm"}</td>
				<td style="background-color: rgb(255, 255, 255);"><#dict type="lable" table="customer_role_rank" filedName="nameen" filedValue="id" value="${record.targetRoleId!}" /></td>
				<td style="background-color: rgb(255, 255, 255);"><#dict type="lable"  value="${record.rolerankid!}"  table="customer_role_rank" filedName="name" filedValue="id" /></td>
				<td style="background-color: rgb(255, 255, 255);"><#dict type="lable"  value="${record.status!}"  dictCode="REVIEW_STATUS" /></td>
				<td style="background-color: rgb(255, 255, 255);">
				<% var applicationType=record.applicationType;
					// 注册用户（机构/投资顾问）
					if(applicationType=='0'||applicationType=='3'){
						if(hasPrivilegeUrl("getRegisterUserReviewDetail")){ 
						%>
							<a title="view" href="javascript:void(0)" onClick="ajaxContent('/reviewUser/getRegisterUserReviewDetail?id=${record.id!}/toUrl?toUrl=/realty/review/userReviewDetail.html');" >${_res["user.review.review"]}</a>&nbsp;&nbsp; 
				<%		}
					//用户升级 
					}if(applicationType=='1'){
							//顾问升级 
							if(record.roleid>1){
								if(hasPrivilegeUrl("ReviewDetail")){ %>
									<a title="view" href="javascript:void(0)" onClick="ajaxContent('/reviewUser/getUpgradingReviewDetail?id=${record.id!}/toUrl?toUrl=/realty/review/ratingReviewDetail.html');" >${_res["user.review.review"]}</a>&nbsp;&nbsp; 
				<%				}
							// 用户升级 
							}else{
								if(hasPrivilegeUrl("InvestReviewDetail")){ %>
									<a title="view" href="javascript:void(0)" onClick="ajaxContent('/reviewUser/getUpgradingInvestReviewDetail?id=${record.id!}/toUrl?toUrl=/realty/review/ratingInvestReviewDetail.html');" >${_res["user.review.review"]}</a>&nbsp;&nbsp; 
				<%			}
						}
						//申请成为投资顾问 
					}else if(applicationType=='4'){
						if(hasPrivilegeUrl("getIToCReviewDetail")){ 
							
						%>
						
							<a title="view" href="javascript:void(0)" onClick="ajaxContent('/reviewUser/getIToCReviewDetail?id=${record.id!}/toUrl?toUrl=/realty/review/userReviewDetail.html');" >${_res["user.review.review"]}</a>&nbsp;&nbsp; 
				<%		}
					}if(hasPrivilegeUrl("/reviewUser/preCheck")){
						if(record.status=='P'){
					 %>
						<a title="review" href="javascript:void(0)" onClick="ajaxContent('/reviewUser/preCheck?id=${record.customer_id!}&applicantId=${record.id!}/toUrl?toUrl=/realty/review/review.html');">${_res["user.review.check"]}</a>&nbsp;&nbsp;
				<% }} %>
				</td>
			</tr>
			<%}%>
		</tbody>
	</table>
	<% } %>
	
	<div id="splitPageDiv">
		<#page formId="reviewUser" />
	</div>
	<#nav />
</div>
